//main.cpp
/********************************************************************************
*																				*
*	Author:			Jared Szechy												*
*	Assignment:		Assignment 3												*
*	Class:			CPS-151														*
*	Instructor:		V. Starkley													*
*	Due Date:		September 20												*
*																				*
*	This program manages bank accounts via a  sorted list.						*
*																				*
********************************************************************************/

#include <iostream>
#include <string>
#include <fstream>
using namespace std;

#include "bankAccount.h"
#include "sortedType.h"
#include "functions.h"

int main()
{
	SortedType Accounts;
	int selection;
	fstream fin;

	fin.open("bankAccounts.txt");
	if (fin.fail())
	{
		cout << "Error opening file" << endl;
		exit(1);
	}

	readAccounts(fin, Accounts);
	fin.close();

	while(true)
	{
		printMenu();

		cin >> selection;
		processSelection(selection, Accounts);
	}

	system("pause");

	return 0;
}